CC=g++
SOURCE=$(wildcard ./src/thread/*.cpp ./src/UI/*.cpp ./src/ui/element/*.cpp ./src/procedure/*.cpp ./src/network/*.cpp ./src/network/base/*.cpp ./src/*.cpp)
TESTSOURCE=$(wildcard ./src/ui/*.cpp ./src/ui/element/*.cpp) ./src/test.cpp
OBJS=$(patsubst %.cpp, %.o, $(SOURCE))
TESTOBJS=$(patsubst %.cpp, %.o, $(TESTSOURCE))
CFLAGS=-g -Llib64 -leasyx -lwsock32 -I include -static -Wno-write-strings -Wno-conversion-null -lwinmm
all:tank
.PHONY:all tidy clean install
tank:$(OBJS)
	$(CC) $(OBJS) $(CFLAGS) -o tank
test:$(TESTOBJS)
	$(CC) $(TESTOBJS) $(CFLAGS) -o test
%.o:%.cpp
	$(CC) $^ $(CFLAGS) -c -o $@
clean:
	rm -rf $(OBJS) *.exe *.o output
tidy:
	rm -rf $(OBJS) output
install:
	rm -rf output
	mkdir output
	cp -r res output
	cp -r map output
	cp tank.exe output